package com.mkz.jbpm.feign.factory;

import org.springframework.stereotype.Component;

import com.mkz.jbpm.feign.ActiIdentityClient;
import com.mkz.jbpm.feign.fallback.ActiIdentityServiceFallback;

import feign.hystrix.FallbackFactory;

/**
 * @author KuangJianyu
 * @date 2020-03-26 15:58:06
 */
@Component
public class ActiIdentityServiceFallbackFactory  implements FallbackFactory<ActiIdentityClient> {

	@Override
	public ActiIdentityClient create(Throwable throwable) {
		ActiIdentityServiceFallback actiIdentityServiceFallback = new ActiIdentityServiceFallback();
		actiIdentityServiceFallback.setCause(throwable);
		return actiIdentityServiceFallback;
	}
}
